﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ferreteria.Forms
{
    public partial class ArticuloCompra : Form
    {
        public ArticuloCompra(Articulos art )
        {
            InitializeComponent();
            txtbArticulo.Text = art.art_nombre;

        }

        private void button1_Click(object sender, EventArgs e)
        {
        FrmCompra.CantidadC = Convert.ToInt32(txtbCantidad.Text);
        FrmCompra.PrecioC = Convert.ToDecimal(txtbPrecioC.Text);
        this.Close();
        }
        
       private void txtbCantidad_KeyPress(object sender, KeyPressEventArgs e)
        {
            Clases.Validar.ValidarNumeros(e); 
        }

      
       private void txtbPrecioC_KeyPress(object sender, KeyPressEventArgs e)
       {
           Clases.Validar.ValidarPrecios(e);
       }

       private void button2_Click(object sender, EventArgs e)
       {
           this.Close();
       }

        



    }
}
